<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>{$page_title}</h5>
                    <div class="ibox-tools"><a href="javascript:void(0);" class="btn btn-xs btn-default btn-help-detail"  data-type="cst_clue"> <i class="fa fa-question-circle"> {:lang('help')}</i></a>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <form id="pagerForm" method="post" class="form-inline searchForm">
                            <div class="col-sm-12">
                                <div class="input-group">
                                    <input type="text" name="keywords" placeholder="{:lang('enter keyword search')}" class="form-control">
                                </div>
                                <div class="input-group">
                                  <span class="input-group-btn">
                                  <button type="button" class="btn btn-primary ajaxSearchForm"><i class="fa fa-search"></i> {:lang('搜索')}</button>
                                  </span>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-6 m-b-xs">
                            <lqf_link>
                                <a class="btn btn-info ajax-open" data-url="{:url('TenMsgType/add')}" data-title="添加企业"><i class="fa fa-plus"></i> {:lang('添加')}</a>
                            </lqf_link>
                        </div>
                        <div class="col-sm-6 text-right">
                            <lqf_link>
                            </lqf_link>
                        </div>
                    </div>
                </div>
                <div class="ibox-content table-responsive">
                    <table class="table table-hover sorttable ajax-list-table" data-url="{:url('TenMsgType/show_json')}"
                           width="100%">
                        <thead>
                        <tr>
                            <th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
                            <th width="80">{:lang('提醒类型')}</th>
                            <th width="80">{:lang('业务标识')}</th>
                            <th width="150">{:lang('事件描述')}</th>
                            <th width="80" class="text-center">{:lang('提前时间')}({:lang('小时')})</th>
                            <th width="80" class="text-center">{:lang('通知总次数')}</th>
                            <th width="80" class="text-center">{:lang('间隔')}({:lang('小时')})</th>
                            <th width="150" class="text-center">{:lang('提醒方式')}</th>
                            <th width="60" class="text-center">{:lang('操作')}</th>
                        </tr>
                        </thead>
                        <tbody>
                        </tbody>
                        <tfoot class="ibox-content">
                        <tr>
                            <td colspan="9" align="center"></td>
                        </tr>
                        </tfoot>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<script id="tableListTpl" type="text/html">
    <%
    for(var i=0;i<data.length;i++) {
    var sms='';if(data[i]['remind_sms']=='1') sms='checked';
    var sys='';if(data[i]['remind_sys']=='1') sys='checked';
    var email='';if(data[i]['remind_email']=='1') email='checked';
    var weixin='';if(data[i]['remind_weixin']=='1') weixin='checked';
    %>
    <tr>
        <td><input name="user_id" class="checkboxCtrlId" value="<%=data[i]['id']%>" type="checkbox"></td>
        <td><%=data[i]['name']%></td>
        <td><%=data[i]['type']%></td>
        <td><%=data[i]['remark']%></td>
        <td class="text-center"><%=data[i]['hours']%></td>
        <td class="text-center"><%=data[i]['remind_nums']%></td>
        <td class="text-center"><%=data[i]['remind_interval']%></td>
        <td class="text-center">
            <input name="visible" class="ajax-checkbox" type="checkbox" data-url="{:url('TenMsgType/set_visible',array('name'=>'remind_sms'))}"  data-id="<%=data[i]['id']%>" <%=sms%> > {:lang('手机')}
            <input name="visible" class="ajax-checkbox" type="checkbox" data-url="{:url('TenMsgType/set_visible',array('name'=>'remind_sys'))}"  data-id="<%=data[i]['id']%>" <%=sys%> > {:lang('系统')}
            <input name="visible" class="ajax-checkbox" type="checkbox" data-url="{:url('TenMsgType/set_visible',array('name'=>'remind_email'))}"  data-id="<%=data[i]['id']%>" <%=email%> > {:lang('邮箱')}
            <input name="visible" class="ajax-checkbox" type="checkbox" data-url="{:url('TenMsgType/set_visible',array('name'=>'remind_weixin'))}"  data-id="<%=data[i]['id']%>" <%=weixin%> > {:lang('微信')}
        </td>
        <td class="text-center">
            <lqf_link><a class="ajax-open" data-url="{:url('TenMsgType/edit')}" data-ids="{'id':'<%=data[i]['id']%>'}">{:lang('修改')}</a></lqf_link>
            <lqf_link><a class="ajax-del confirm" data-url="{:url('TenMsgType/del')}" data-ids="{'id':'<%=data[i]['id']%>'}">{:lang('删除')}</a></lqf_link>
        </td>
    </tr>
    <% } %>
</script>
<script type="text/javascript">
    $(document).ready(function () {
        turnPage(1);
    });
</script>